package com.zs.mp.model.vo;

import java.util.Date;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Past;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ValidVO {
	
	private Integer id;
	@NotBlank(message = "用户名不能为空")
	private String username;
	@Range(min = 0,max = 150,message = "年龄应在0~150的范围内")
//	@Digits(fraction = 0,integer = 150)
	private Integer age;
	
	private String gender;
	@Past(message = "出生日期应该是当前日期的过去")
	private Date birthday;
	@Length(min = 0,max = 150,message = "地址不能超出范围")
	private String address;
}
